Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@observablehq/inspector
Advanced tools
[![Node CI](https://github.com/observablehq/inspector/workflows/Node%20CI/badge.svg)](https://github.com/observablehq/inspector/actions?workflow=Node+CI)
This library implements the default value renderer for Observable programs. When used with the Observable runtime as observers, inspectors can insert elements into the DOM and render interactive displays for arbitrary values.
To install this library from npm:
npm install @observablehq/inspector
This library is also available for download from unpkg as an ES module and as a UMD bundle.
An inspector implements the Observable runtime’s Observer interface by rendering the current value of its associated variable to a given DOM element. Inspectors display DOM elements “as-is”, and create interactive “devtools”-style inspectors for other arbitrary values such as numbers and objects.
Creates a new inspector attached to the specified DOM element. See also Inspector.into.
Applies the observablehq--running
class to this inspector’s element.
# inspector.fulfilled(value) <>
Inspects the specified value, replacing the contents of this inspector’s element as appropriate, and dispatching an update event. If the specified value is a DOM element or text node, and the value is not already attached to the DOM, it is inserted into this inspector’s element, replacing any existing contents. Otherwise, for other arbitrary values such as numbers, arrays, or objects, an expandable display of the specified value is generated into this inspector’s element. Applies the observablehq
class to this inspector’s element, and for non-element values, the observablehq--inspect
class.
# inspector.rejected(error) <>
Inspects the specified error, replacing the contents of this inspector’s element as appropriate with the error’s description, and dispatching an error event. Applies the observablehq
and observablehq--error
class to this inspector’s element.
# Inspector.into(container) <>
Returns a function that when passed a given variable, returns a new inspector attached to a new DIV element within the specifier container element. If container is a string, it represents a selector, and the container element becomes the matching selected element. This method can be used with an Observable module definition as the observer factory to conveniently render an entire program.
FAQs
[![Node CI](https://github.com/observablehq/inspector/workflows/Node%20CI/badge.svg)](https://github.com/observablehq/inspector/actions?workflow=Node+CI)
The npm package @observablehq/inspector receives a total of 5,714 weekly downloads. As such, @observablehq/inspector popularity was classified as popular.
We found that @observablehq/inspector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.